package org.ytor.core.sqlflow.dsl.template.node.support;

import org.ytor.core.sqlflow.dsl.expr.node.ExprNode;
import org.ytor.core.sqlflow.dsl.template.node.TemplateNode;

/**
 * created by yangtong on 2025/8/7 11:58:52
 * <br/>
 * if 节点
 */
public class IfNode implements TemplateNode {
    /**
     * if 的条件表达式对应的AST树
     */
    public final ExprNode condition;
    /**
     * if块
     */
    public final BlockNode body;

    public IfNode(ExprNode condition, BlockNode body) {
        this.condition = condition;
        this.body = body;
    }

    @Override
    public String toString() {
        return "IfNode(condition=" + condition + ")";
    }
}
